﻿@using SunTzu.Utility;
@model form_exhibitor
@{
    ViewBag.Title = "参展登记";
    Layout = "~/Views/Shared/_LayoutUserCenter.cshtml";
    Model.AreaId = Model.AreaId > 0 ? Model.AreaId : CacheHelper<code_area>.GetAll().OrderBy(c => c.Order).ToList()[0].Id;
    Model.TreatmentId = Model.TreatmentId > 0 ? Model.TreatmentId : CacheHelper<code_treatment>.GetAll().OrderBy(c => c.Order).ToList()[0].Id;
    List<int> scopes = new List<int>();
    if(!string.IsNullOrEmpty(Model.Scope))
    {
        scopes.AddRange(Model.Scope.Split(',').Select(c => c.ParseToInt()));
    }
    List<int> intentions = new List<int>();
    if (!string.IsNullOrEmpty(Model.Intention))
    {
        intentions.AddRange(Model.Intention.Split(',').Select(c => c.ParseToInt()));
    }
    List<int> purposeNeeds = new List<int>();
    if (!string.IsNullOrEmpty(Model.PurposeNeed))
    {
        purposeNeeds.AddRange(Model.PurposeNeed.Split(',').Select(c => c.ParseToInt()));
    }
    List<int> purposeOffers = new List<int>();
    if (!string.IsNullOrEmpty(Model.PurposeOffer))
    {
        purposeOffers.AddRange(Model.PurposeOffer.Split(',').Select(c => c.ParseToInt()));
    }
    if(Model.Id == 0)
    {
        Model.IsReceiveEmail = true;
        Model.IsOpenToSite = true;
        Model.MainContacterGender = true;
        Model.ContacterGender = true;
        Model.IsInviteVistor = true;
        Model.IsJoinEntDb = true;
    }
    bool isWaiting = Model.Id > 0 && Model.State == 0;
    bool isApproved = Model.State == 1;
}
<script src="/js/exhibitor.js"></script>
    <div class="registerForm registerFormInner">
    <form id="editForm" action="/Exhibitor/CreateExhibitor?id=@Model.Id" method="post">
        <p class="registerFormTitle">参展登记表</p>
        @if (isWaiting)
        {
        <p class="hCent redText">* 您的参展登记表已经提交，正在等待审核。您可以继续修改以下内容</p>
        }
        else if (isApproved)
        {
        <p class="hCent redText">* 您的参展登记表已经通过审核。</p>
        }
        <div class="registerFormSubTitle">企业信息（将刊登于会刊、官网，请完整填写）</div>
        <p class="hCent">请您将您参展的特色内容或特色产品、展位活动信息填写清楚，以便我们进行遴选和媒体推荐。</p>
        <ul>
            <li class="formProp"><span>*</span>单位名称：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="Title" id="Title" value="@Model.Title" />
                <span targetId="Title" class="tipMsg">请输入单位名称</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>单位地址：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="Address" id="Address" value="@Model.Address" />
                <span targetId="Address" class="tipMsg">请输入单位地址</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>联系电话：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="Tel" id="Tel" value="@Model.Tel" />
                <span targetId="Tel" class="tipMsg">请输入联系电话</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>传真：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="Fax" id="Fax" value="@Model.Fax" />
                <span targetId="Fax" class="tipMsg">请输入传真</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">网址：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" name="Url" id="Url" value="@Model.Url" />
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>企业简介：</li>
            <li class="formLongLine">
                <textarea name="Description" id="Description" class="required textareaLong" rows="6" cols="5">@Model.Description</textarea>
                <span targetId="Description" class="tipMsg">请输入企业简介</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>参展展品：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required" name="Exhibit" id="Exhibit" value="@Model.Exhibit" />
                <span targetId="Exhibit" class="tipMsg">请输入参展展品</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">展场活动：</li>
            <li class="formLongLine">
                <textarea name="Activity" id="Activity" class="textareaLong" rows="6" cols="5">@Model.Activity</textarea>
            </li>
            <li class="clear"></li>
        </ul>
        <div class="registerFormSubTitle">展商信息</div>
        <ul>
            <li class="formProp"><span>*</span>负责人：</li>
            <li class="formLongLine">
                <input type="text" class="inputNormal required" name="MainContacter" id="MainContacter" value="@Model.MainContacter" />
                <input type="radio" value="True" name="MainContacterGender" @(Model.MainContacterGender ? "checked" : "") /> 先生
                <input type="radio" value="False" name="MainContacterGender" @(!Model.MainContacterGender ? "checked" : "") /> 女士
                <span targetId="MainContacter" class="tipMsg">请输入负责人</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">负责人职务：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" name="MainContacterTitle" id="MainContacterTitle" value="@Model.MainContacterTitle" />
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>负责人移动电话：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required mobile" name="MainContacterMobile" id="MainContacterMobile" value="@Model.MainContacterMobile" />
                <span targetId="MainContacterMobile" class="tipMsg">请输入正确的移动电话</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>负责人电子邮箱：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required email" name="MainContacterEmail" id="MainContacterEmail" value="@Model.MainContacterEmail" />
                <span targetId="MainContacterEmail" class="tipMsg">请输入正确的电子邮箱</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>联系人：</li>
            <li class="formLongLine">
                <input type="text" class="inputNormal required" name="Contacter" id="Contacter" value="@Model.Contacter" />
                <input type="radio" value="True" name="ContacterGender" @(Model.ContacterGender ? "checked" : "") /> 先生
                <input type="radio" value="False" name="ContacterGender" @(!Model.ContacterGender ? "checked" : "") /> 女士
                <span targetId="Contacter" class="tipMsg">请输入联系人</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">联系人职务：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" name="ContacterTitle" id="ContacterTitle" value="@Model.ContacterTitle" />
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>联系人移动电话：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required mobile" name="ContacterMobile" id="ContacterMobile" value="@Model.ContacterMobile" />
                <span targetId="ContacterMobile" class="tipMsg">请输入正确的移动电话</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>联系人电子邮箱：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong required email" name="ContacterEmail" id="ContacterEmail" value="@Model.ContacterEmail" />
                <span targetId="ContacterEmail" class="tipMsg">请输入正确的电子邮箱</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp"><span>*</span>展区选择：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                @foreach (var area in CacheHelper<code_area>.GetAll().OrderBy(c => c.Order))
                {
                    <li><input type="radio" @(area.Id == Model.AreaId ? "checked" : "") name="AreaId" value="@area.Id" /> @area.Title</li>
                }
                </ul>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">
                展位订购：
            </li>
            <li class="formLongLine">
                <input type="radio" name="BoothType" @(Model.BoothType == 0 ? "checked" : "") value="0" /> 标准展位
                <input type="text" class="inputSmall" @(Model.BoothType != 0 ? "disabled" : "") name="BoothAmount" value="@(Model.BoothType == 0 && Model.BoothAmount > 0 ? Model.BoothAmount.ToString() : "")" />
                个（3m×3m），RMB 8000/个
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">
            </li>
            <li class="formLongLine">
                <input type="radio" name="BoothType" @(Model.BoothType == 1 ? "checked" : "") value="1" /> 光地展位
                <input type="text" class="inputSmall" @(Model.BoothType != 1 ? "disabled" : "") name="BoothAmount" value="@(Model.BoothType == 1 && Model.BoothAmount > 0 ? Model.BoothAmount.ToString() : "")"/>
                m<span class="textSuper">2</span>（36m<span class="textSuper">2</span>起租），RMB 800/m<span class="textSuper">2</span>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">楣牌名称：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" name="LintelName" id="LintelName" value="@Model.LintelName" />（标准展位填写）
            </li>
            <li class="clear"></li>
        </ul>
        <div class="registerFormSubTitle">业务范围</div>
        <ul>
            <li class="formProp"><span>*</span>业务范围：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                @foreach (var scope in CacheHelper<code_scope>.GetAll().OrderBy(c => c.Order))
                {
                    <li @(scope.Title == "其他" ? "class=multiSelectionInput" : "")>
                        <input type="checkbox" @(scopes.Contains(scope.Id) ? "checked" : "") name="Scope" value="@scope.Id" /> @scope.Title
                        @if (scope.Title == "其他")
                        {
                        <input type="text" name="ScopeOtherName" class="inputNormal" value="@Model.ScopeOtherName" />
                        }
                    </li>
                }
                </ul>
            </li>
            <li class="clear"></li>
        </ul>
        <div class="registerFormSubTitle">服务需求</div>
        <ul>
            <li class="formProp">广告认购：</li>
            <li class="formLongLine">
                如有广告认购需求, 请联系组委会招商招展组, 联系人: 胡小姐, 0592-5371968, 13606096693
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">参展展品评选：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" @*name="LintelName" id="LintelName" value="@Model.LintelName"*@ />
                <br />（参选展品，参选奖项，展品介绍）
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">项目签约：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" @*name="LintelName" id="LintelName" value="@Model.LintelName"*@ />
                <br />（项目名称，项目介绍，签约方）
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">参展统计调查：</li>
            <li class="formLongLine">
                <input type="radio" name="allowSurvey" checked value="是"/> 是
                <input type="radio" name="allowSurvey" value="否"/> 否
                （协助组委会完成参展效果统计）
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">发布组织采购代理合作：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" @*name="LintelName" id="LintelName" value="@Model.LintelName"*@ />
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">其他：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" @*name="LintelName" id="LintelName" value="@Model.LintelName"*@ />
            </li>
            <li class="clear"></li>
        </ul>
        <div class="registerFormSubTitle">参展目的</div>
        <ul>
            <li class="formProp">寻求：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                @foreach (var purpose in CacheHelper<code_purpose>.GetAll().OrderBy(c => c.Order))
                {
                    <li @(purpose.Title == "其他" ? "class=multiSelectionInput" : "")>
                        <input type="checkbox" @(purposeNeeds.Contains(purpose.Id) ? "checked" : "") name="PurposeNeed" value="@purpose.Id" /> @purpose.Title
                    </li>
                }
                </ul>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">提供：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                @foreach (var purpose in CacheHelper<code_purpose>.GetAll().OrderBy(c => c.Order))
                {
                    <li @(purpose.Title == "其他" ? "class=multiSelectionInput" : "")>
                        <input type="checkbox" @(purposeOffers.Contains(purpose.Id) ? "checked" : "") name="PurposeOffer" value="@purpose.Id" /> @purpose.Title
                    </li>
                }
                </ul>
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">是否加入高校文化创意设计大赛企业库？</li>
            <li class="formLongLine">
                <input type="radio" name="IsJoinEntDb" @(Model.IsJoinEntDb ? "checked" : "") value="True" /> 是
                <input type="radio" name="IsJoinEntDb" @(!Model.IsJoinEntDb ? "checked" : "") value="False"/> 否
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">是否邀请客商参会？</li>
            <li class="formLongLine">
                <input type="radio" name="IsInviteVistor" @(Model.IsInviteVistor ? "checked" : "") value="True" /> 是
                <input type="radio" name="IsInviteVistor" @(!Model.IsInviteVistor ? "checked" : "") value="False"/> 否
            </li>
            <li class="clear"></li>
        </ul>

        <div class="registerFormSubTitle">推荐媒体</div>
        <ul>
            <li class="formProp">网站：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" name="MediaWebSite" id="MediaWebSite" value="@Model.MediaWebSite" />
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">期刊：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" name="MediaPublication" id="MediaPublication" value="@Model.MediaPublication" />
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">杂志：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" name="MediaJournal" id="MediaJournal" value="@Model.MediaJournal" />
            </li>
            <li class="clear"></li>
        </ul>
        <ul>
            <li class="formProp">其他：</li>
            <li class="formLongLine">
                <input type="text" class="inputLong" name="MediaOther" id="MediaOther" value="@Model.MediaOther" />
            </li>
            <li class="clear"></li>
        </ul>
        <div class="registerFormSubTitle">物流模式（境外展商填写）</div>
        <div class="registerFormSubTitle">大陆产业落地意向</div>
        <ul>
            <li class="formProp">大陆产业落地意向：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                @foreach (var intention in CacheHelper<code_intention>.GetAll().OrderBy(c => c.Order))
                {
                    <li @(intention.Title == "其他" ? "class=multiSelectionInput" : "")>
                        <input type="checkbox" @(intentions.Contains(intention.Id) ? "checked" : "") name="Intention" value="@intention.Id" /> @intention.Title
                        @if (intention.Title == "其他")
                        {
                        <input type="text" name="IntentionOtherName" class="inputNormal" value="@Model.IntentionOtherName" />
                        }
                    </li>
                }
                </ul>
            </li>
            <li class="clear"></li>
        </ul>
        <div class="registerFormSubTitle">展品展后处理（境外展商填写）</div>
        <ul>
            <li class="formProp"><span>*</span>展品展后处理：</li>
            <li class="formLongLine">
                <ul class="multiSelections">
                @foreach (var treatment in CacheHelper<code_treatment>.GetAll().OrderBy(c => c.Order))
                {
                    <li><input type="radio" @(treatment.Id == Model.TreatmentId ? "checked" : "") name="TreatmentId" value="@treatment.Id" /> @treatment.Title</li>
                }
                </ul>
            </li>
            <li class="clear"></li>
        </ul>
        <div class="registerFormSubTitle">海峡两岸文博会企业信息库登记</div>
        <p class="hCent">加入海峡两岸文博会企业信息库，您将定期获得海峡两岸文博会采购商信息，获得更多配对服务。</p>
        <p class="selectTitle">是否愿意在海峡两岸文博会官方网站公开企业信息？</p>
        <ul>
            <li class="formProp"></li>
            <li class="formLongLine">
                <input type="radio" name="IsOpenToSite" @(Model.IsOpenToSite ? "checked" : "") value="True" /> 是
                <input type="radio" name="IsOpenToSite" @(!Model.IsOpenToSite ? "checked" : "") value="False"/> 否
            </li>
            <li class="clear"></li>
        </ul>
        <p class="selectTitle">是否愿意收到海峡两岸文博会定期文化产业分类信息电子邮件？</p>
        <ul>
            <li class="formProp"></li>
            <li class="formLongLine">
                <input type="radio" name="IsReceiveEmail" @(Model.IsReceiveEmail ? "checked" : "") value="True" /> 是
                <input type="radio" name="IsReceiveEmail" @(!Model.IsReceiveEmail ? "checked" : "") value="False"/> 否
            </li>
            <li class="clear"></li>
        </ul>
        @if (!isApproved)
        {
        <div class="clear"></div>
        <div class="solidLine"></div>
        <div class="buttonBox">
            <a class="smallButton" href="javascript:void()" onclick="$('#editForm').submit();">@(Model.Id == 0 ? "提交报名" : "保存")</a>
            <div style="display: none">
                <input id="submitbutton" type="submit" value="提  交" />
                <input type="button" value="取  消" />
            </div>
        </div>
        }
    </form>
    </div>
